/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ultrasoft.farmasoft.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Administrador
 */
@Embeddable
public class TransactionPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "periodIds")
    private int periodIds;
    @Basic(optional = false)
    @Column(name = "transactionId")
    private int transactionId;

    public TransactionPK() {
    }

    public TransactionPK(int periodIds, int transactionId) {
        this.periodIds = periodIds;
        this.transactionId = transactionId;
    }

    public int getPeriodIds() {
        return periodIds;
    }

    public void setPeriodIds(int periodIds) {
        this.periodIds = periodIds;
    }

    public int getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(int transactionId) {
        this.transactionId = transactionId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) periodIds;
        hash += (int) transactionId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TransactionPK)) {
            return false;
        }
        TransactionPK other = (TransactionPK) object;
        if (this.periodIds != other.periodIds) {
            return false;
        }
        if (this.transactionId != other.transactionId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ultrasoft.farmasoft.domain.TransactionPK[ periodIds=" + periodIds + ", transactionId=" + transactionId + " ]";
    }
    
}
